﻿
using System.Collections.Generic;
using System.Linq;

namespace VoiceMessager.Stream.Cmd
{
	public class CmdStream
	{
		public byte Header { get; set; }
		public byte[] DataLength { get;  set; }
		public byte Command { get;  set; }
		public byte[] CommandParam { get;  set; }
		public byte[] SendData { get;  set; }

		public byte[] GetBytes()
		{
			var l = new List<byte> {Header};
			l.AddRange(DataLength);
			l.Add(Command);
			l.AddRange(CommandParam);
			l.AddRange(SendData);
			return l.ToArray();
		}
	}
}
